<template>
  <div class="fields-bottom-options" v-if="fieldsObj.type">
    <el-select v-model="fieldsObj.settings.value" :multiple="fieldsObj.settings.multiple"
        :filterable="fieldsObj.settings.filterable" disabled class="lpage-form_select">
      <el-option
        v-for="vi in fieldsObj.settings.options"
        :key="vi.value"
        :label="vi.label"
        :value="vi.value"
        :multiple="fieldsObj.settings.multiple"
        :filterable="fieldsObj.settings.filterable"
      ></el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  name: 'CSelect',
  props: {
    fields: {
      default: () => {
        return {}
      },
    },
  },
  watch: {
    fields: {
      handler (val) {
        this.fieldsObj = val
      },
      deep: true,
      immediate: true,
    },
  },
  data () {
    return {
      fieldsObj: {},
      disableEmpty: ''
    }
  },
  mounted () {
    this.fieldsObj = this.fields
  },
}
</script>

<style lang="less" scoped>
.fields-bottom-input {
  border: 1px solid #dcdfe6;
  background-color: #ffffff;
  border-radius: 4px;
  height: 40px;
  line-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  .input-tips {
    color: #d6dada;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  .input-content {
    color: #282a2a;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
  }
}

.fields-bottom-options {
  .options-row {
    // .flex(center, '', '', wrap);
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    .options-portait {
      margin-right: 20px;
    }
  }

  .options-portait {
    margin-bottom: 8px;
    color: #494d4c;
    font-size: 14px;
    // .flex(center);
    display: flex;
    align-items: center;

    &::before {
      content: "";
      margin-right: 6px;
      width: 10px;
      height: 10px;
      display: block;
      border: 2px solid darkgray;
    }
  }

  .options-portait-circle {
    &::before {
      border-radius: 50%;
    }
  }
}
</style>
